<?php
/**
 * Created by PhpStorm.
 * User: 毛文科
 * Date: 2018\10\28 0028
 * Time: 10:03
 */
namespace app\admin\model;
use think\Db;

class GetHtml
{
    /**获取document的页面
     * @param $lanmu：栏目数组
     * @param null $data：是否添加数据
     * @return string
     */
    static public function GetHtml_for_document($lanmu,$data=null){
        if($data){
            $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>文档名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" autocomplete="off" value="'.$data['title'].'"  id="title" name="title">
			</div>
		</div><div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>上级栏目：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<select name="pid">';
            foreach ($lanmu as $value){
                if($value['id']==$data['pid']){
                    $str .='<option value="'.$value['id'].'" selected>'.$value['title'].'</option>';
                }else{
                    $str .='<option value="'.$value['id'].'">'.$value['title'].'</option>';
                }

            }
            $str.='</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>状态：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<select name="status">';
            if($data['status']=='1'){
                $str .= '<option value="1" selected>启用</option>
					<option value="0">禁用</option>';
            }else{
                $str .= '<option value="1">启用</option>
					<option value="0" selected>禁用</option>';
            }
            $str .='</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>地址描述：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="'.$data['dir'].'" autocomplete="off"  id="dir" name="dir">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>排序：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" autocomplete="off" value="'.$data['sort'].'"  id="sort" name="sort">
			</div>
		</div><div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>关键词：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="'.$data['keywords'].'" autocomplete="off"  id="keywords" name="keywords">
			</div>
		</div><div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>关键词描述：</label>
			<div class="formControls col-xs-8 col-sm-9">
			<textarea id="description" name="description" style="width: 100%;height: 50px">'.$data['description'].'</textarea>
			</div>
		</div>';
        }else{
            $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>文档名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" autocomplete="off"  id="title" name="title">
			</div>
		</div><div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>上级栏目：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<select name="pid">';
            foreach ($lanmu as $value){
                $str .='<option value="'.$value['id'].'">'.$value['title'].'</option>';
            }
            $str.='</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>状态：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<select name="status">
					<option value="1">启用</option>
					<option value="0">禁用</option>
				</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>地址描述：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" autocomplete="off"  id="dir" name="dir">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>排序：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" autocomplete="off" value="100"  id="sort" name="sort">
			</div>
		</div></div><div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>关键词：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text"  autocomplete="off"  id="keywords" name="keywords">
			</div>
		</div><div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>关键词描述：</label>
			<div class="formControls col-xs-8 col-sm-9">
			<textarea id="description" name="description" style="width: 100%;height: 50px"></textarea>
			</div>
		</div>';
        }
        return $str;
    }

    /**获取单行文本的html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_danhangwenben($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">
			<span class="c-red">*</span>' . $value['field_name'] . '：
		</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="' . $shuju[$value['field_title']] . '" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '" >
		</div>
	</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">
			<span class="c-red">*</span>' . $value['field_name'] . '：
		</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '" >
		</div>
	</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }

    /**获取多行文本html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_duowenjian($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<textarea name="' . $value['field_title'] . '"  id="' . $value['field_title'] . '" style="width: 100%;height: 100px">'.$shuju[$value['field_title']].'</textarea>
			</div>
		</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<textarea name="' . $value['field_title'] . '" id="' . $value['field_title'] . '" style="width: 100%;height: 100px"></textarea>
			</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }

    /**获取单文件html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_danwenjian($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '">点击上传
				</div>
			</div>
		</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '">点击上传
				</div>
			</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取多文件html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_danduowenjian($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '[]" multiple>点击上传
				</div>
			</div>
		</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '[]"" multiple>点击上传
				</div>
			</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取单图片html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_dantupian($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '" onchange="yulan(this)">点击预览
				</div>
			</div>
		</div>';
                if($shuju[$value['field_title']]){
                    $str .='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>图片预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">
				<img src="'.get_img($shuju[$value['field_title']]).'" width="50%"/>
			</div>
		</div>';
                }else{
                    $str .='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>图片预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">
				
			</div>
		</div>';
                }
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '" onchange="yulan(this)">点击预览
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>图片预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">
				
			</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取视频html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_shipin($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '" onchange="yulanshipin(this)">点击预览
				</div>
			</div>
		</div>';
                if($shuju[$value['field_title']]){
                    $str .='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>视频预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">
				<video src="'.config('fuwuqi').'/'.$shuju[$value['field_title']].'" controls="controls" style="width: 50%">
您的浏览器不支持 video 标签。
                    </video>
			</div>
		</div>';
                }else{
                    $str .='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>视频预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">
				
			</div>
		</div>';
                }
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '" onchange="yulanshipin(this)">点击预览
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>视频预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">
				
			</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取多图片html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_duotupian($value,$shuju=null){
//        echo '<pre>';
//        print_r($shuju);exit;
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '[]" onchange="yulan(this)" multiple>点击预览
				</div>
			</div>
		</div>';
                $str .= '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>图片预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">';
                if($shuju[$value['field_title']]&&count(json_decode($shuju[$value['field_title']],true))){
                    foreach (json_decode($shuju[$value['field_title']],true) as $va){
                        $str .='<img src="'.get_img($va).'" width="100px"/>';
                    }
                }
                $str .= '</div>
		</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>' . $value['field_name'] . '：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<div class="file">
					<input type="file" id="' . $value['field_title'] . '" name="' . $value['field_title'] . '[]" onchange="yulan(this)" multiple>点击预览
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>图片预览：</label>
			<div class="formControls col-xs-8 col-sm-9 show">
				
			</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取单选框html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_danxuankuang($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>'.$value['field_name'].'：</label>
			<div class="formControls col-xs-8 col-sm-9">';
                if ($value['type_option']) {
                    $array = explode(',', $value['type_option']);
                    foreach ($array as $values) {
                        if($shuju[$value['field_title']]==$values){
                            $str .= '<input type="radio" name="'.$value['field_title'].'" value="'.$values . '" checked>'.$values;
                        }else{
                            $str .= '<input type="radio" name="'.$value['field_title'].'" value="'.$values . '">'.$values;
                        }
                    }
                }

                $str .= '</div>
		</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str = '<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>'.$value['field_name'].'：</label>
			<div class="formControls col-xs-8 col-sm-9">';
                if ($value['type_option']) {
                    $array = explode(',', $value['type_option']);
                    foreach ($array as $values) {
                        $str .= '<input type="radio" name="'.$value['field_title'].'" value="'.$values . '">'.$values;
                    }
                }

                $str .= '</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取复选框html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_fuxuankuang($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str ='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>'.$value['field_name'].'：</label>
			<div class="formControls col-xs-8 col-sm-9">';
                if ($value['type_option']) {
                    $array = explode(',', $value['type_option']);
                    foreach ($array as $values) {
                        $a = 0;
                        if($shuju[$value['field_title']]){
                            $arrays = json_decode($shuju[$value['field_title']]);
                            foreach ($arrays as $va){
                                if($va==$values){
                                    $a=1;
                                }
                            }
                        }
                        if($a==1){
                            $str .= '<input type="checkbox" name="'.$value['field_title'].'[]" value="' . $values . '" checked>' . $values;
                        }else{
                            $str .= '<input type="checkbox" name="'.$value['field_title'].'[]" value="' . $values . '">' . $values;
                        }
                    }
                }

                $str .= '</div>
		</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str ='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>'.$value['field_name'].'：</label>
			<div class="formControls col-xs-8 col-sm-9">';
                if ($value['type_option']) {
                    $array = explode(',', $value['type_option']);
                    foreach ($array as $values) {
                        $str .= '<input type="checkbox" name="'.$value['field_title'].'[]" value="' . $values . '">' . $values;
                    }
                }

                $str .= '</div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取下拉框html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_xialakuang($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str ='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>'.$value['field_name'].'：</label>
			<div class="formControls col-xs-8 col-sm-9"><select name="'.$value['field_title'].'">';
                if ($value['type_option']) {
                    $array = explode(',', $value['type_option']);
                    foreach ($array as $values) {
                        if($shuju[$value['field_title']]==$values){
                            $str .= '<option value="'.$values.'" selected>'.$values.'</option>';
                        }else{
                            $str .= '<option value="'.$values.'">'.$values.'</option>';
                        }

                    }
                }

                $str .= '</select></div>
		</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str ='<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>'.$value['field_name'].'：</label>
			<div class="formControls col-xs-8 col-sm-9"><select name="'.$value['field_title'].'">';
                if ($value['type_option']) {
                    $array = explode(',', $value['type_option']);
                    foreach ($array as $values) {
                        $str .= '<option value="'.$values.'">'.$values.'</option>';
                    }
                }

                $str .= '</select></div>
		</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }
    /**获取编辑文本html
     * @param $value：字段数组
     * @param null $shuju：是否有数据
     * @return string
     */
    static public function GetHtml_for_bianjiwenben($value,$shuju=null){
        if($shuju){
            if ($value['type_status'] == 1) {
                $str ='<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">
			<span class="c-red">*</span>' . $value['field_name'] . '：
		</label>
		<div class="formControls col-xs-8 col-sm-9">
			<script id="editor" type="text/plain" name="'.$value['field_title'].'" style="width:100%;height:500px;">'.$shuju[$value['field_title']].'</script>
		</div>
	</div>';
            }else{
                $str = '';
            }
        }else{
            if ($value['type_status'] == 1) {
                $str ='<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">
			<span class="c-red">*</span>' . $value['field_name'] . '：
		</label>
		<div class="formControls col-xs-8 col-sm-9">
			<script id="editor" type="text/plain" name="'.$value['field_title'].'" style="width:100%;height:500px;"></script>
		</div>
	</div>';
            }else{
                $str = '';
            }
        }
        return $str;
    }

    /**获取所有的html
     * @param $pid:上级id
     * @param null $id:有数据的id
     * @param null $modelid:模型id
     * @return string]
     */
    static public function GetAllHtml($pid,$id=null,$modelid=null){
//        $resul = Db::connect();
        if($pid){
            $lanmu[]   = Db::name('document')->where('id',$pid)->find();
            $ss = (new Commons())->getDatas($pid);
            $lanmu = array_merge($lanmu,$ss);
        }else{
            $lanmu = Db::view('document',true)
                ->view('model','surface','document.model=model.id','left')
                ->whereOr('surface','cate')
                ->select();
        }
        if(!$pid){
            $lanmu[] = ['id'=>0,'title'=>'网站门户'];
        }
//        return $lanmu;
        $model = [];
        if($id){
            $model = Db::view('document',true)
                ->view('model','surface','document.model=model.id','left')
                ->where('document.id',$id)
                ->find();
            $modelid = $model['model'];
        }
        $array = Db::name('table_field')->where('modelid',$modelid)->select();
        $shuju = [];
        if($id){
            $shuju = Db::name($model['surface'])->where('uid',$id)->find();
        }
//        echo '<pre>';print_r($lanmu);exit;
        $str = GetHtml::GetHtml_for_document($lanmu,$model);
//        return $array;
        foreach ($array as $value){
            if ($value['field_type'] == '单行文本') {
                $str .= GetHtml::GetHtml_for_danhangwenben($value,$shuju);
                //多行文本添加
            } elseif ($value['field_type'] == '多行文本') {
                $str .= GetHtml::GetHtml_for_duowenjian($value,$shuju);
                //单文件
            } elseif ($value['field_type'] == '单图片') {
                $str .= GetHtml::GetHtml_for_dantupian($value,$shuju);
                //多文件
            } elseif ($value['field_type'] == '多图片') {
                $str .= GetHtml::GetHtml_for_duotupian($value,$shuju);
                //单选框
            }elseif ($value['field_type'] == '单文件') {
                $str .= GetHtml::GetHtml_for_danwenjian($value,$shuju);
                //单选框
            }elseif ($value['field_type'] == '多文件') {
//                $haha = GetHtml::GetHtml_for_duowenjian($value,$shuju);
                $str .= GetHtml::GetHtml_for_danduowenjian($value,$shuju);
//                return $haha;
                //单选框
            } elseif ($value['field_type'] == '单选框') {
                $str .= GetHtml::GetHtml_for_danxuankuang($value,$shuju);
                //复选框
            }elseif ($value['field_type'] == '复选框'){
//                $haha = GetHtml::GetHtml_for_fuxuankuang($value,$shuju);
//                return $haha;
                $str .= GetHtml::GetHtml_for_fuxuankuang($value,$shuju);
                //下拉框
            }elseif ($value['field_type'] == '下拉框'){
                $str .= GetHtml::GetHtml_for_xialakuang($value,$shuju);
                //编辑文本
            }elseif($value['field_type'] == '编辑文本'){
                $str .= GetHtml::GetHtml_for_bianjiwenben($value,$shuju);
            }elseif($value['field_type'] == '视频'){
                $str .= GetHtml::GetHtml_for_shipin($value,$shuju);
            }
        }
        return $str;
    }
}